---
layout: "default"
title: "withUnsafeMutablePointerToElements"
description: "Swift documentation for 'withUnsafeMutablePointerToElements': Call body with an UnsafeMutablePointer to the Element."
keywords: "withUnsafeMutablePointerToElements,func,swift,documentation"
root: "/v3.0"
---

<div class="declaration" id="func-withunsafemutablepointertoelements-r_-unsafemutablepointer-element-throws-r">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-withunsafemutablepointertoelements-r_-unsafemutablepointer-element-throws-r">final func withUnsafeMutablePointerToElements&lt;R&gt;(<wbr>_: (UnsafeMutablePointer&lt;Element&gt;) throws -&gt; R)</a>
        
<div class="comment collapse" id="comment-func-withunsafemutablepointertoelements-r_-unsafemutablepointer-element-throws-r"><div class="p">
    <p>Call <code>body</code> with an <code>UnsafeMutablePointer</code> to the <code>Element</code>
storage.</p>

<p><strong>Note:</strong> This pointer is only valid for the duration of the
  call to <code>body</code>.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">final func withUnsafeMutablePointerToElements&lt;R&gt;(_ body: (UnsafeMutablePointer&lt;Element&gt;) throws -&gt; R) rethrows -&gt; R</code>
    
    
</div></div>
</div>
